package com.xls.boxlibrary.network;

import android.content.Context;


import com.xls.boxlibrary.Consts.NetConsts;

import java.io.File;

import okhttp3.MediaType;
import okhttp3.RequestBody;

public class RequestManager {

    private static RequestManager requestManager;
    private static IApiserver apiService;

    private RequestManager(Context context) {
        if (null == requestManager || null == apiService) {
            apiService = RetrofitBase.getInstace(context).setBaseUrl(NetConsts.BASE_COM_URL).create(IApiserver.class);
        }
    }

    public static IApiserver getInstance(Context context) {
        if (requestManager == null) {
            synchronized (RequestManager.class) {
                requestManager = new RequestManager(context);
            }
        }
        return apiService;
    }
}
